<?php

namespace App\Providers;

use App\Models\House;
use App\Models\Shopping;
use Illuminate\Support\ServiceProvider;

class ConfigServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap the application services.
     *
     * @return void
     */
    public function boot()
    {
        view()->composer('*',function($view){
            //全局配置信息
            $config = \App\Models\Config::first();
            $view->with('config',$config);
        });
    }

    /**
     * Register the application services.
     *
     * @return void
     */
    public function register()
    {
        //
    }
}
